﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Snake
{
    class Backgrund
    {
        object2D f_topBackgrund;
        object2D f_botBackgrund;
        object2D f_leftBackgrund;
        object2D f_rigthBackgrund;
        object2D f_midBackgrund;

        public Backgrund(object2D top, object2D bot, object2D left, object2D rigth, object2D mid)
        {
            f_topBackgrund = top;
            f_botBackgrund = bot;
            f_leftBackgrund = left;
            f_rigthBackgrund = rigth;
            f_midBackgrund = mid;
        }
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Begin();
            spriteBatch.Draw(f_topBackgrund.texture, f_topBackgrund.pos, Color.White);
            spriteBatch.Draw(f_botBackgrund.texture, f_botBackgrund.pos, Color.White);
            spriteBatch.Draw(f_leftBackgrund.texture, f_leftBackgrund.pos, Color.White);
            spriteBatch.Draw(f_rigthBackgrund.texture, f_rigthBackgrund.pos, Color.White);
            spriteBatch.Draw(f_midBackgrund.texture, f_midBackgrund.pos, Color.White);
            spriteBatch.End();
        }
        public void DrawWhitoutMid(SpriteBatch spriteBatch)
        {
            spriteBatch.Begin();
            spriteBatch.Draw(f_topBackgrund.texture, f_topBackgrund.pos, Color.White);
            spriteBatch.Draw(f_botBackgrund.texture, f_botBackgrund.pos, Color.White);
            spriteBatch.Draw(f_leftBackgrund.texture, f_leftBackgrund.pos, Color.White);
            spriteBatch.Draw(f_rigthBackgrund.texture, f_rigthBackgrund.pos, Color.White);
            spriteBatch.End();
        }
    }
}
